﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Modellayer;
using Dblayer;

namespace Controllayer
{
    public class ReservationCtr
    {
        DbReservation dbRes;

        
        public ReservationCtr()
        {
            dbRes = new DbReservation();
        }

        public void createReservation(Person p, Show show, List<Seat> seats, int reservationsID)
        {
            Reservation res = new Reservation(reservationsID, seats, show, p);
            dbRes.createReservation(res);
        }

        public void deleteReservation(int reservationsID)
        {
            Reservation res = dbRes.findReservation(reservationsID);
            dbRes.deleteReservation(res);
        }

        public List<Reservation> findAllReservations()
        {
            List<Reservation> res = dbRes.findAllReservations();
            return res;
        }
    }
}
